<template>
<!--供应商头部-->
    <div class="root-box">
        <div class="provider-header-box" @click.stop="JumpToPage(companyInfo.userId)">
            <div class="header-left">
                <view class="img-logo">
                    <image :src='shopLogo' class="avator-logo"  v-if="shopLogo">
                    </image>
                </view>
                <view class="text-box">
                     <view class="text-title">
                         {{companyInfo.shopName}}
                     </view>
                    <view class="text-store">
                         {{companyInfo.enterpriseName}}
                     </view>
                </view>
            </div>
            <div class="header-right">
                <u-icon size="16" name="arrow-right" color='#626262'></u-icon>
            </div>
            
        </div>

    </div>
</template>


<script>
export default {
    props: {
        supplierDate:{
            type: Object,
           
        }
    },
    data () {
        return {

            companyInfo: {},
            shopLogo: ''
            
        }
    },
    mounted() {

     
        this.companyInfo = this.supplierDate
        
        this.shopLogo = this.companyInfo.shopLogo[0].url
      
        // console.log(this.companyInfo.shopLogo)
      



        
    },
    methods: {
        JumpToPage(id) {
                 uni.navigateTo({
                    url: `../../pages/store/index?id=${id}`,
                })
        }

    }

    
}
</script>

<style lang="scss" scoped>

.provider-header-box{
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
   
    .header-left {
        display: flex;
        align-items: center;
        .avator-logo{
            width: 40px;
            height: 40px;
            border-radius: 50%;
            margin-right: 10px;

        }
        .text-title{
            font-size: 14px;
            color: #333;
            font-weight: 600;
        }
        .text-store{
            font-size: 10px;
            color: #ABABAB;
        }
    }

}

</style>